package com.test2015;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

public class TestScroll extends JFrame{
	
	public TestScroll(){
		JPanel jPanel = new JPanel(new BorderLayout());
		
		JPanel left = new JPanel();
		left.setBackground(Color.red);
		left.setPreferredSize(new Dimension(70,600));
		
		JScrollPane pane = new JScrollPane(left);
		
		
		jPanel.add(pane,BorderLayout.WEST);
		Container contentPane = this.getContentPane();
		contentPane.add(jPanel);
		
		
		this.setDefaultCloseOperation(EXIT_ON_CLOSE);
		this.setSize(400, 300);
		this.setLocationRelativeTo(null);
		this.setVisible(true);
	}
	
	
	public static void main(String[] args) {
		new TestScroll();
	}
}
